package cn.tedu.wenzhang1.base.aspect;


import cn.tedu.wenzhang1.base.response.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

import java.util.Arrays;

@Aspect
@Component
@Slf4j
public class LogPrintASP {

    @Before(value = "execution(public *  cn.tedu.wenzhang1.controller.*.login(..) )")
    public void beforeMethod(JoinPoint joinPoint){
        System.out.println("前置通知");
        Object[] args = joinPoint.getArgs();
        log.debug("args:"+args[0]);
    }
}
